home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c++ / 978 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.5 KB

  1. Path: cs.mu.OZ.AU!bounce-back
  2. From: "Nathan Myers <ncm@cantrip.org>" <ncm@cantrip.org>
  3. Newsgroups: comp.std.c++
  4. Subject: Re: some STL questions
  5. Date: 06 Apr 96 05:34:24 GMT
  6. Organization: Best Internet Communications
  7. Approved: fjh@cs.mu.oz.au
  8. Message-ID: <316597B9.40DE4194@cantrip.org>
  9. References: <4k0mcd$179b@rs18.hrz.th-darmstadt.de> <31655027.3CFF@compuserve.com>
  10. NNTP-Posting-Host: mundook.cs.mu.oz.au
  11. X-Original-Date: Fri, 05 Apr 1996 13:59:21 -0800
  12. X-Mailer: Mozilla 2.01 (X11; I; Linux 1.2.13 i386)
  13. X-Auth: PGPMoose V1.1 PGP comp.std.c++
  14.     iQBFAgUBMWYCd+EDnX0m9pzZAQFlGAF+OEDSU2Tr4bgv37KOMwgq7YEXe5/oIRuL
  15.     iTRUsKSuBX4SoD+kl/t0ShIAy2zq7Fug
  16.     =GfWc
  17. Originator: fjh@mundook.cs.mu.OZ.AU
  18.  
  19. Charles F. McDevitt wrote:
  20. > Robert Krueger wrote:
  21. > > can anyone tell me about the chances of STL becoming ANSI standard? 
  22. > The STL WILL be part of the C++ standard.  But the standard
  23. > defines the interface to the STL and what functionality it
  24. > should provide, but does not dictate a particular implementation.
  25. > Right now, there a dozens of STL implementations floating about.
  26. > Most are matched to older drafts of the standard, some to the
  27. > latest draft.  Some are just versions of the HP public domain
  28. > implementation, some are commercial implementations for sale,
  29. > and some are updated versions to work around deficiencies in
  30. > particular compilers.
  31.  
  32. Just to make sure no one misses the point:
  33.  
  34. It is meaningless to say "The" STL.  There are lots of them and they
  35. are not entirely compatible with one another or with the Draft standard.
  36.  
  37. The commercial implementations tend to be mostly upward/backward/leftward
  38. compatible with what's in the Draft, but not completely.  Probably both the
  39. biggest and most common incompatibility is in the definition of stack<>,
  40. queue<>, and priority_queue<>:
  41.  
  42.   HP STL:  template <class Container> class stack;
  43.   Draft:   template <class Element, class Container=deque<Element>...>
  44.            class stack;
  45.  
  46. An upward-compatible implementation (for "obsolete" compilers) would say:
  47.  
  48.   XYZInc:  template <class Element> class stack;   // use deque<Element>
  49.  
  50. but I don't know which commercial STL releases do this yet (if any).
  51.  
  52. Nathan Myers
  53. ncm@cantrip.org
  54. ---
  55. [ comp.std.c++ is moderated.  To submit articles: try just posting with      ]
  56. [ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu         ]
  57. [ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
  58. [ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
  59. [ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
  60.